package com.liyiqing.secondhandmall.memberservice.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.liyiqing.commonservice.validator.ListValue;
import com.liyiqing.commonservice.validator.methodgroup.AddGroup;
import com.liyiqing.commonservice.validator.methodgroup.DeleteGroup;
import com.liyiqing.commonservice.validator.methodgroup.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 某账号收藏的商品
 * 
 * @author LiYiQing
 * @email 1570865668@qq.com
 * @date 2022-02-18 22:47:22
 */
@Data
@TableName("member_user_collect_spu")
public class MemberUserCollectSpuEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	@Null(message = "新增时不可指定id",groups = {AddGroup.class})
	@NotNull(message = "修改或删除时必须指定id",groups = {UpdateGroup.class, DeleteGroup.class})
	private Long id;
	/**
	 * 买家账号id
	 */
	@NotNull(message = "新增时必须填写买家账号id",groups = {AddGroup.class})
	private Long memberId;
	/**
	 * 商品id
	 */
	@NotNull(message = "新增时必须填写商品id",groups = {AddGroup.class})
	private Long spuId;
	/**
	 * 商品图片url
	 */
	private String spuImg;
	/**
	 * 收藏时间create_time
	 */
	private String createTime;
	/**
	 * 收藏状态：0取消；1收藏
	 */
	@TableLogic(value="1",delval="0")
	@ListValue(values = {0,1},message = "状态只能是:【1(收藏)】or【0(取消)】")
	private Integer status;

}
